import request from '@/utils/request'
import store from '../../store'
const subSysPrefix = '/bussSys'
// 业务系统检索
export function subSysSelect(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/USystem/select',
    method: 'post',
    data: postselectinfo
  })
}

// 业务系统插入
export function subSysInsert(postselectinfo) {
  postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/USystem',
    method: 'post',
    data: postselectinfo
  })
}

// 业务系统更新
export function subSysUpdate(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/USystem/' + postselectinfo.id,
    method: 'PUT',
    data: postselectinfo
  })
}

// 业务系统删除
export function subSysDelete(postselectinfo) {
  // postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/USystem',
    method: 'DELETE',
    data: postselectinfo
  })
}
/*
// 资源库连接测试
export function reslibConn(postselectinfo) {
// alert(store.getters.token)
  postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/KRepository/connection',
    method: 'post',
    data: postselectinfo
  })
}
export function transTree(repositoryId) {
// alert(store.getters.token)
// postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/KRepository/getTransTree/' + repositoryId,
    method: 'post',
    data: { }
  })
}

export function jobTree(repositoryId) {
// alert(store.getters.token)
// postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/KRepository/getJobTree/' + repositoryId,
    method: 'post',
    data: { }
  })
}
// 资源库更新
export function reslibUpdate(postselectinfo) {
// postselectinfo.userid = store.getters.userid
  return request({
    url: subSysPrefix + '/KRepository/' + postselectinfo.repositoryId,
    method: 'PUT',
    data: postselectinfo
  })
}*/
